#include "MainWindow.h"
#include <QString>
#include <QFile>
#include <QTextStream>
#include <QApplication>
#include <memory>
#include "SpdLoger.h"
//#include "MyLibrary.h"


int main(int argc, char *argv[])
{
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
	QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#if QT_VERSION >= 0x050600
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#endif
	std::shared_ptr<int> b;
	QApplication a(argc, argv);
	a.setApplicationName("super system");
	a.setQuitOnLastWindowClosed(true);
	a.setWindowIcon(QIcon(":/image/ads_icon2.svg"));

    //MyLibrary lib;
    //lib.sayHello();
	
	//log
	Logger::init();
	SPDLOG_LOGGER_INFO(Logger::getLogger(), "main construct");

	CMainWindow mw;
	mw.show();

	QFile StyleSheetFile(":/cssfiles/app.css");
	StyleSheetFile.open(QIODevice::ReadOnly);
	QTextStream StyleSheetStream(&StyleSheetFile);
	a.setStyleSheet(StyleSheetStream.readAll());
	StyleSheetFile.close();
	return a.exec();
}
